﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Kkc.Model.Album>>" ContentType="text/xml" %>
<data transition="CrossFadeTransition"> 
    <% foreach (var album in Model) { %>
    <album title="<%= Html.Encode(album.Title) %>" description="<%= Html.Encode(album.Summary) %>"> 
        <% if (album.Photos.Any()) { %>
            <% foreach (var photo in album.Photos) { %>
            <slide title="<%= Html.Encode(photo.Title) %>" description="<%= Html.Encode(photo.Title) %>" source="<%= Url.Action("Image", "Photo", new { id = photo.Id }) %>" thumbnail="<%= Url.Action("Thumbnail", "Photo", new { id = photo.Id }) %>" /> 
            <% } %>
        <% } else { %>
        <slide title="Ingen bilder" description="Dette albumet innholder for tiden ingen bilder" source="<%= Url.Content("~/Content/Images/bg-input.png")  %>" /> 
        <% } %>
    </album>
    <% } %>
</data>
